# -*- encoding:UTF-8 -*-
from rest_framework import serializers
from nlc.models import User, Group
from django.contrib.auth.hashers import make_password


class user_serializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ('user_login_name', 'user_pass', 'user_web_name', 'user_gender', 'user_school',
                  'user_qq', 'user_phone', 'user_score', 'user_star_level', 'user_flag', 'user_pic',
                  'user_ver_question', 'user_ver_answer')


class group_serializer(serializers.ModelSerializer):
    class Meta:
        model = Group
        fields = ('group_login_name', 'group_pass', 'group_name', 'group_school', 'group_leader_name',
                  'group_email', 'group_pic', 'group_score', 'group_star_level', 'group_flag', 'group_ver_question',
                  'group_ver_answer')